package com.lightboat.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 类型（1自营，2百度平台）
 */
@Getter
@AllArgsConstructor
public enum ProductType {
    SELF(1, "自营"),
    THIRD_PARTY(2, "第三方平台");
    private final Integer type;
    private final String message;

    public static ProductType getByType(Integer type) {
        for (ProductType value : ProductType.values()) {
            if (value.type.equals(type)) {
                return value;
            }
        }
        return null;
    }
}
